package com.cy.milktea.pojo;


import com.cy.milktea.pojo.System.BaseObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@EqualsAndHashCode(callSuper = true)//将其父类属性也进行比较
@ToString(callSuper = true)//显示其父类属性
@Data
public class User extends BaseObject implements Serializable {

    private static final long serialVersionUID = 6849794400754667322L;

    private Integer id;  //-------->用户编号
    private String username;  //--->账号
    private String password;  //--->密码
    private String salt;  //------->加密盐值
    private String name;  //------->真实姓名
    private Integer roleId;  //---->角色编号
    private Integer sex;  //----->性别
    private String mobile;  //----->手机号码
    private String email;  //------>邮箱
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    private Date birthday;  //----->生日
    private String address;  //---->住址
    private Long salary;  //------->工资
    private Integer valid;  //----->状态

    private String roleName;  //--->角色名称

}
